/*
 * 文件名：GoodsCollectionServiceImpl.java
 * 版权：Copyright by hlst
 * 描述：
 * 修改人：liuziyu
 * 修改时间：2016年7月8日
 * 跟踪单号：
 * 修改单号：
 * 修改内容：
 */

package com.zcsy.manage.service.mall.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zcsy.manage.model.mall.GoodsCollection;
import com.zcsy.manage.persistence.mall.GoodsCollectionDao;
import com.zcsy.manage.service.mall.IGoodsCollectionService;

@Service
public class GoodsCollectionServiceImpl implements IGoodsCollectionService{

	@Autowired
	private GoodsCollectionDao goodsCollectionDao;
	
	@Override
	public List<GoodsCollection> getGoodsCollectionByOwnerId(String ownerId) {
		return goodsCollectionDao.getGoodsCollectionByOwnerId(ownerId);
	}
	
	@Override
	public GoodsCollection getGoodsCollectionByOwnerIdAndGoodsId(String ownerId, String goodsId) {
		return goodsCollectionDao.getGoodsCollectionByOwnerIdAndGoodsId(ownerId, goodsId);
	}
	
	@Override
	public int insertCollection(GoodsCollection goodsCollection) {
		return goodsCollectionDao.insertCollection(goodsCollection);
	}
	
	@Override
	public int deleteByOwnerIdAndGoodsId(String ownerId, String goodsId) {
		return goodsCollectionDao.deleteByOwnerIdAndGoodsId(ownerId, goodsId);
	}
}
